import request from '@/utils/request'

// 查询电子发票列表
export function listMemberInvoice(query) {
  return request({
    url: '/parking/memberInvoice/list',
    method: 'get',
    params: query
  })
}

// 查询电子发票详细
export function getMemberInvoice(id) {
  return request({
    url: '/parking/memberInvoice/' + id,
    method: 'get'
  })
}

// 新增电子发票
export function addMemberInvoice(data) {
  return request({
    url: '/parking/memberInvoice',
    method: 'post',
    data: data
  })
}

// 修改电子发票
export function updateMemberInvoice(data) {
  return request({
    url: '/parking/memberInvoice',
    method: 'put',
    data: data
  })
}

// 删除电子发票
export function delMemberInvoice(id) {
  return request({
    url: '/parking/memberInvoice/' + id,
    method: 'delete'
  })
}

// 开具电子发票
export function issueInvoice(data) {
  return request({
    url: '/parking/memberInvoice/issueInvoice',
    method: 'post',
    data: data
  })
}
